未加星标

Python Python Python! Python 3 Comes to Wallaroo (for stream processing)

字体大小 | |
[开发(python) 所属分类 开发(python) | 发布者 店小二04 | 时间 2018 | 作者 红领巾 ] 0人收藏点击收藏

If you’ve tried to build a scalable distributed system in python you could be excused for thinking that the world is conspiring against you; in spite of Python’s popularity as a programming language for everything from data processing to robotics, there just aren’t that many options when it comes to using it to create resilient stateful applications that scale easily across multiple workers. About a year ago we created the Wallaroo Python API to help address this problem. At the time we were working with some potential customers who were still using Python 2.7, so that’s what we targeted.

When we created the original Wallaroo Python API, we knew that we would eventually want to add support for Python 3, but Python 3 adoption was still moving slowly and we felt that there were other more pressing technical challenges to address first. But as time went on, we drew closer and closer to the last day of Python 2.7 . Finally, GitHub user caj-larsson offered to help us with the initial work to get Python 3 support off the ground.

If you’re familiar with what Wallaroo is, feel free to skip the next section.

What is Wallaroo

Wallaroo is a framework designed to make it easier for developers to build and operate high-performance applications written inPython. It handles the complexity of building distributed streaming data processing applications so all that you need to worry about is the domain logic.

Our goal is to make sure―regardless of where your data is coming from―that you can scale your application logic horizontally. All while removing the challenges that otherwise come with distributed applications.

From Python 2 to Python 3

Wallaroo’s API was already Python 3 compatible, so the only changes Wallaroo needed were internal to the Wallaroo Framework. This allowed support to be added without introducing incompatibilities with existing applications. All of our examples work with both Python 2 and Python 3. But your application code can now use functions and constructs that only exist in Python 3, as well as libraries that are written in Python 3.

The biggest difference that impacted Wallaroo’s implementation was the difference between the way Python 2 and Python 3 treat strings and bytes. In Python 2, a string can contain any sequence of bytes, but in Python 3 strings are explicitly UTF-8 sequences. The differences are mostly transparent to the Wallaroo user, but there’s slightly different logic depending on which version of Python is being used.

Wallaroo programs using Python 2 are run using an executable called machida . We created a separate executable called machida3 for running Python 3 programs. This makes it easier to see which version of Python is being used.

For more details, please take a look at thePython API documentation.

Using Python 3

Support for Python 3 has been tested to work with Python 3.5 on ourDocker image, ourVagrant box, Ubuntu (Xenial, Artful, Bionic) and Debian (Stretch, Buster). Follow the setup directions for your system, and thenrun an application using machida3 instead of machida . From there you can start building your own Python 3 applications.

Conclusion

Wallaroo now lets you take advantage of the power of Python 3 when creating applications. This means that Wallaroo can move with your organization as you continue to use Python in the future.

We’re continuing to develop our Python API, so look for developments in the next few releases.

If you’re interested in giving the new Python 3 support a try, see the available examples and ourPython documentation. This is a preview release of Python 3 support, so please let us know if you have thoughts or feedback. The best way is either via IRC or our mailing list .

If you’re looking to get started with Wallaroo for the first time, you can install Wallaroo via docker:

docker pull \ wallaroo-labs-docker-wallaroolabs.bintray.io/release/wallaroo:latest

Other installation options can be foundhere.

We at Wallaroo Labs would again like to extend a special thank you to caj-larsson , who did the first round of work on Python 3 support.

本文开发(python)相关术语:python基础教程 python多线程 web开发工程师 软件开发工程师 软件开发流程

代码区博客精选文章
分页:12
转载请注明
本文标题:Python Python Python! Python 3 Comes to Wallaroo (for stream processing)
本站链接:https://www.codesec.net/view/611600.html


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 开发(python) | 评论(0) | 阅读(72)