E*****m 发帖数: 25615 | | d********g 发帖数: 10550 | 2 看样子是用了Bottle这个framework,自己包了一下做了个Mixin来用
其实Bottle主要就一个屌丝码工开发的,虽然是open source但还是有很多地方不合理
。要是Netflix连Bottle都敢用,那Python还真是长脸了
静候二爷吐槽if __name__ == "__main__"
from netflix.service import BotoService, Route53Service
from netflix.service.bottle import BottleService, get
class HelloNflx(BottleService, Route53Service):
@get('/')
def index(self):
return "Hello from Netflix!"
if __name__ == "__main__":
HelloNflx.main()
【在 E*****m 的大作中提到】 : http://techblog.netflix.com/2013/03/python-at-netflix.html : 好蟲可以評論一下。
| p*****2 发帖数: 21240 | 3
netflix跟我没啥关系吧?
【在 d********g 的大作中提到】 : 看样子是用了Bottle这个framework,自己包了一下做了个Mixin来用 : 其实Bottle主要就一个屌丝码工开发的,虽然是open source但还是有很多地方不合理 : 。要是Netflix连Bottle都敢用,那Python还真是长脸了 : 静候二爷吐槽if __name__ == "__main__" : from netflix.service import BotoService, Route53Service : from netflix.service.bottle import BottleService, get : class HelloNflx(BottleService, Route53Service): : @get('/') : def index(self): : return "Hello from Netflix!"
| d********g 发帖数: 10550 | 4 __name__ == "__main__"不是标准吐槽对象吗,不管谁用
【在 p*****2 的大作中提到】 : : netflix跟我没啥关系吧?
| p*****2 发帖数: 21240 | 5
已经吐过了吧?
【在 d********g 的大作中提到】 : __name__ == "__main__"不是标准吐槽对象吗,不管谁用
| g*****g 发帖数: 34805 | 6 Nothing wrong to use Python under SOA. The point of SOA is flexibility.
However, as each team also provides client for their web service, the usage
of Python in Netflix is actually quite limited, as nobody would bother to
maintain 2 clients. You can use Scala, Groovy and other JVM languages of
your choice, with Python, the users have to wrap their own. What you see in
the list is mostly monitoring, scripting that internally uses command line
tools provided by Amazon to manage AWS.
【在 E*****m 的大作中提到】 : http://techblog.netflix.com/2013/03/python-at-netflix.html : 好蟲可以評論一下。
| s***o 发帖数: 6934 | 7 if it's a restful service you can easily have the server built in python and
only provide jvm based client. but it's kinda weird.
usage
in
line
【在 g*****g 的大作中提到】 : Nothing wrong to use Python under SOA. The point of SOA is flexibility. : However, as each team also provides client for their web service, the usage : of Python in Netflix is actually quite limited, as nobody would bother to : maintain 2 clients. You can use Scala, Groovy and other JVM languages of : your choice, with Python, the users have to wrap their own. What you see in : the list is mostly monitoring, scripting that internally uses command line : tools provided by Amazon to manage AWS.
| g*****g 发帖数: 34805 | 8 Typically it's the other way around, as the entire netflix platform is built
on Java. The problem, as I mentioned, is that the rest client is provided
by the team that authors the service too, they may not know Python well in
the first place and they'd definite avoid maintaining two clients. So while
you can rewrite the rest client in your favorite language, you don't really
know the service well to do it, and it can be vulnerable to service change.
and
【在 s***o 的大作中提到】 : if it's a restful service you can easily have the server built in python and : only provide jvm based client. but it's kinda weird. : : usage : in : line
| w**z 发帖数: 8232 | 9 Netflix is increasingly turning to Python over Java to power certain aspects
of its video-streaming service, such as generating and processing alerts,
boosting resilience, securing transactions, producing deployable AMIs (
Amazon Machine Images), and for managing and automatic Cassandra clusters.
http://www.infoworld.com/t/python/why-netflix-embracing-python- | c****e 发帖数: 1453 | 10 A little bit surprised to know that the service team owns the client lib in
Netflix. I think in general it enforces the provider to make the service
more robust with better versioning when it loses the control of clientlib
therefore no place to hide small "tricks". As everything is moving to
Restful, any language can set up the client in hours, if not in minutes. But
I agree, if the service is complicated, there would be the difference
between first class citizen and the rest of the world.
built
while
really
.
【在 g*****g 的大作中提到】 : Typically it's the other way around, as the entire netflix platform is built : on Java. The problem, as I mentioned, is that the rest client is provided : by the team that authors the service too, they may not know Python well in : the first place and they'd definite avoid maintaining two clients. So while : you can rewrite the rest client in your favorite language, you don't really : know the service well to do it, and it can be vulnerable to service change. : : and
| g*****g 发帖数: 34805 | 11 Rest client is not always trivial. It may include asynchronous calls, it may
need to establish thread pool on its own. Sometimes services may be closely
related and you want the aggregation to happen on client side. Only the
service authors will know the intrinsic. That's why a java client is always
provided.
in
But
【在 c****e 的大作中提到】 : A little bit surprised to know that the service team owns the client lib in : Netflix. I think in general it enforces the provider to make the service : more robust with better versioning when it loses the control of clientlib : therefore no place to hide small "tricks". As everything is moving to : Restful, any language can set up the client in hours, if not in minutes. But : I agree, if the service is complicated, there would be the difference : between first class citizen and the rest of the world. : : built : while
| p**o 发帖数: 3409 | |
|