From 66531df62971f54cba0c17730bb4edba3e9aa56a Mon Sep 17 00:00:00 2001 From: Roman Glushko Date: Sun, 7 May 2023 14:51:00 +0300 Subject: [PATCH] =?UTF-8?q?#75=20Inited=20Pixi=20=F0=9F=92=8E=20(#76)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * #75 Inited Pixi πŸ’Ž * #75 Made the logo bigger * #75 Added license to the project --- examples/pixi/LICENSE | 202 +++++++++++++++++++++ examples/pixi/Makefile | 14 ++ examples/pixi/README.md | 16 +- examples/pixi/Tiltfile | 13 ++ examples/pixi/common/__init__.py | 0 examples/pixi/frontend/static/logo.png | Bin 0 -> 10370 bytes examples/pixi/services/__init__.py | 0 examples/pixi/services/gateway/__init__.py | 0 hyx/common/events.py | 8 + hyx/timeout/api.py | 4 +- 10 files changed, 253 insertions(+), 4 deletions(-) create mode 100644 examples/pixi/LICENSE create mode 100644 examples/pixi/Makefile create mode 100644 examples/pixi/Tiltfile create mode 100644 examples/pixi/common/__init__.py create mode 100644 examples/pixi/frontend/static/logo.png create mode 100644 examples/pixi/services/__init__.py create mode 100644 examples/pixi/services/gateway/__init__.py diff --git a/examples/pixi/LICENSE b/examples/pixi/LICENSE new file mode 100644 index 0000000..3805e05 --- /dev/null +++ b/examples/pixi/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2023 Roman Hlushko + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/examples/pixi/Makefile b/examples/pixi/Makefile new file mode 100644 index 0000000..aa5e97c --- /dev/null +++ b/examples/pixi/Makefile @@ -0,0 +1,14 @@ +# Copyright 2023 Roman Hlushko +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/examples/pixi/README.md b/examples/pixi/README.md index 8cac494..5eeb823 100644 --- a/examples/pixi/README.md +++ b/examples/pixi/README.md @@ -1,4 +1,16 @@ -# Pixi +

+Pixi Jewelery Shop +

-Pixi is a sample microservice app that uses Hyx to improve resilency and fault tolerance. +# Pixi πŸ’Ž +Pixi is a sample jewelery shop architected as a cloud-native microservice system that uses Hyx to improve resiliency and fault tolerance. +Under the hood, Pixi uses modern asyncio Python to implement its microservices and run them in a Kubernetes environment. + +The system implements all common features of an eCommerce website like product catalog browsing, cart and checkout, so on. + +It’s easy to deploy with little to no configuration. + +## Credits + +Inspired by [Google's Online Boutique](https://github.com/GoogleCloudPlatform/microservices-demo) diff --git a/examples/pixi/Tiltfile b/examples/pixi/Tiltfile new file mode 100644 index 0000000..e4bd43d --- /dev/null +++ b/examples/pixi/Tiltfile @@ -0,0 +1,13 @@ +# Copyright 2023 Roman Hlushko +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/examples/pixi/common/__init__.py b/examples/pixi/common/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/examples/pixi/frontend/static/logo.png b/examples/pixi/frontend/static/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..2313b82a552d8e85114674b1612b0935ccde1b03 GIT binary patch literal 10370 zcmdsdc|4Tw*S}rX%33nXmM}<-lr_6jlx57wGPa0PS+b4YShHu8C4|HbW=3{nUqTWx zAxo;Uja`ha&pmxVpWk24AHP4J=ka=RUH5g)d7t+=*SXI1^1AQXJH`fF>_Y5xbaY%d z40TQE=$LS{UnWLi<@E9LePCd6(YmcgM~6@1*tcf}p6R_z4YcXXKM5}Y4`=S&GS@SB za?1r3?-KRgHR}1%(NV{zfuy36@}^eu+?i_0ux9NvZLenMR6!he=r4P|w)0T}{<&NOWqQ*&pN&p2N@^ ztXC*mPTEOuBnnM5$c3ykhq2c!)*r1&hKYM_E!*Idxu4{@j<&fS>yBkfW%ki+7l7(q zy#?_$WPSJkgcvB#qa4sEbUg>ZV*tSkX@dr@6Y>&Wud7_=9}M*lwc-#RqF zD?^=Fp!4zSbUS7c$6~B<9W>bDcFaeYu_s*R4gCV0g)RW*CKm~i%91T)6qXh;6!>zI z3mXNH`iq#%eMb)hfRVIgyhH2j9F%k+-Vz+f3jfcQD&SsMM>3iFSE-IlOOGBSM)XaX zla>*{HyM@eq?J{tt%9S)n{O=&IsqU*2_9^5S2;%mC<7FNL=Wd*Ghjq%@n-h$57E=2 z-;8HTMY$rBBGCX-ZJPfQAdVIq2LT|K7}xKGjM;WT+Qb09?`J{z*y4#=;?H~pB9iP5AU{GPIzG2A5&bR)3W-CjYza|A>*5wf`>7pE0$Pka_=6o zI|CnF0$VT6Wn$cSk7XHS6Vz{3%`S!&+0}^HrKTSqqMYz2g6AVeyFv-dQ^4y|_-U_-ZjaKDoQnw~AZnY&TxyPbc+ZA;LhGu+p zb+}0<3N|->9`L2B~(udaYoZj`(juqkw)cFcNa%kOJ4tam+PdEJ-O%9bF^wI z->xVbKeDE$tApnHai$PY%$g{6!WX*9J-)pf;GBv76>h9nDwv8Dgdg*fdI7z96I(9j zMZ7id5^Gs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4}zFfPfE^y!Kvl166y=b3174^(rQ#LldaM8K$N2?k0z}7?z$)ZRHM0 z-0e~C`Y_j*72Y4}8H0!8ed{tSykWo3?y*PXuXyUI+*-pLQ}f&qrE^{}QP+&3P4-ss z6)noZ!SD;hJ)3m23wsQd^pjLj&WU$729kP5J{q(aKk@Va^K$@(e|tPVPrq#q~L!g9!EVf7-0Ud;s3D!f$vw0}F4jmrKYp z1Ks1CWi9{0-}B5~^S3$ZLB8MD*QrYdGm3iXseGUbJIV}M>uAE-bl@QC1E0|-rvc*s zf7?{>8~PeCph4Z*HMtLbX(J8dj5HJl{bH9cj8HzU7YDS6>u~@yuolB2k;3hX;saV) z4BwDed9oOsMZ5467nxleXoBZZKr2hu1!$QXvNDRAK9BN5UFO9`hY)xh$4`lV0_rob;$Rj{}#kr z^sn2$xU_C;m;%Hj4YbHm2^vFfpd+Vf1Dwu#eAhg|^*`|wxX_~-)@UXgv+%>_XHm4T e2I=TR@4nYi+ str: + stack = traceback.extract_stack(limit=3) + print(stack) + return "" + + class EventManager: """ Keeps track of currently active listeners tasks dispatched on the recent events diff --git a/hyx/timeout/api.py b/hyx/timeout/api.py index 1e3df64..5cd468e 100644 --- a/hyx/timeout/api.py +++ b/hyx/timeout/api.py @@ -2,7 +2,7 @@ from types import TracebackType from typing import Any, Optional, Sequence, Type, cast -from hyx.common.events import EventDispatcher +from hyx.common.events import EventDispatcher, get_default_name from hyx.common.typing import FuncT from hyx.timeout.listeners import TimeoutListener from hyx.timeout.manager import TimeoutManager @@ -32,7 +32,7 @@ def __init__( self._timeout_secs = timeout_secs self._timeout_manager: Optional[TimeoutManager] = None - self._name = name # TODO: set default name on None + self._name = name or get_default_name() self._listeners = listeners def _create_timeout(self) -> TimeoutManager: