I am new to Google cloud platform and is working on developing Google app engine app in standard Java environment. For some of the part, I require using Google cloud pub/sub. Looking at the resources available, I feel that pub/sub can only be integrated in the flexible environment. Can someone please tell if it is possible to integrate pub/sub in the standard environment and if yes then how?
For standard environment try this client https://developers.google.com/api-client-library/java/apis/pubsub/v1.
IOM somewhat limited but it works.
For some reason I cannot find the official examples anymore, Google has probably removed them, which is pretty evil since the cloud pub sub library doesn't work in standard env plus the fact that cloud pub sub library is still in alpha which to is a reason not to use i t for production.
Found this, should help you on the way:
http://book2s.com/java/src/package/com/google/cloud/pubsub/client/demos/appengine/util/pubsubutils.html
Related
I have a very basic REST API that provides some information, which was written with JAX-RS.
Now I want to implement some azure cli commands, like az acr repository list as well as kubectl.
I found the Azure Java SDK, and read its API reference, but I couldn't figure out how I will basically list the repositories.
Kubernetes example is much better, but I am stuck with Azure Container Registry.
Basically I am asking a code sample (reference), or tutorial, or guidance.
Whatever my experience of using Azure docs, it's little hard to find API doc which will work for you and you may found some discrepancies between docs like one of API via cli vs sdk behaves different.
As per my work with various clouds, most of the cloud clients are inclined to use python SDKs. 3-4 ago, I had used java for openstack, now python. For VCloud, used java but now moving to python, in fact they stopped to provide java sdk.
Hope you have got some pointers.
We are using Google App Engine for back-end development. We're considering the scalability, change of server and data movement to another cloud platform in future, as well the robustness in application. Please suggest the frameworks that can be used in Google App Engine (Java based).
End point exposure/Rest web services
ORM/database connection
Service and db layer integration
Logging
Unit testing
etc
Please add any points that I may have missed.
Update: The reason behind asking this question is that when we start development we will get a hell lot of samples, for example:
Rest web services - we have Spring Boot/Spring rest web services
DB - we have JDO, Google Datastore, etc.
For easy access we can use Spring Core.
If we browse through information on Google App Engine Java development, we're unable to find a list of advantages/disadvantages. It's correct that we have many options. While answering please also consider the bolded words. The question definitely looks simple from an angle, but it's a serious issue for the fresh development.
There are several products and services within Google App Engine that will help you out building scalable backends in Java using App Engine. Here are some examples based on what you may be looking for:
Endpoints Frameworks on App Engine in Java - helps with developing, deploying and managing APIs on any Google Cloud backend.
Objectify - a Java data access API, specifically designed for the GAE datastore.
Stackdriver logging - provides facilities for importing, viewing, storing and retrieving timestamped logs from apps running in GCP.
Unit Testing in Java - which allows you to test the quality of your code after you’ve written it, as well as to improve your development process as you go along.
UPDATE: This article on Designing for Scale is a good place to start for best practices on scalability in App Engine. Regarding robustness, that’s a given using App Engine, as it is designed as a robust development environment for written applications. If you’re considering moving to another cloud platform in future, take a look at the GCP documentation on exporting data for each specific product you wish to export from.
You may find these articles on Spring Framework useful, which focus on the benefits and best practices.
Announcing Spring Cloud GCP—integrating your favorite Java framework with Google Cloud
Optimizing Spring Framework for App Engine Applications
I am attempting to create a program that can manage EC2 instances (create, stop, terminate). I am unfamiliar with the service, and after looking through documentation and searching the web have not found any general advice on creating a management service. My questions are:
What programming environment/language would best be suited to creating a management program?
How can this program interact with EC2 instances? (I've looked into AWS EC2 command line tools. Can these be used from a program to create/terminate instances?)
Any general advice in accomplishing this is appreciated (links to examples especially).
What programming environment/language would best be suited to creating a management program?
This question cannot be answered in a definite way, rather you should either choose the language you are most comfortable with or that's best suited to your environment/team instead - there are plenty to choose from, most popular major languages are covered by a dedicated SDK (currently Java, .NET, Node.js, Python, PHP, Ruby), see Tools for Amazon Web Services for the detailed listing and links to further information about each.
Please note that there are also two IDE Toolkits listed that might make it easier to get started if you happen to develop in Java or C#, specifically the AWS Toolkit for Eclipse and the AWS Toolkit for Microsoft Visual Studio.
How can this program interact with EC2 instances?
All the SDKs (and also the command line tools build on top of these) do use the AWS APIs to interact with the respective services (each one has a separate API, but most of them are structured very similar), see Documentation for a listing of all currently available services and links to their documentation:
Welcome to the Amazon Web Services (AWS) Documentation. Whether you are new to AWS or an advanced user, you can find useful information about the services ranging from introductions to advanced features.
To learn how you can get started with AWS, see our Getting Started with AWS guide. If you are interested in learning more about our AWS Free Usage Tier, see our AWS free usage tier article.
I guess you are new to the cloud and aws world, you can use AWS Command line tools to management the services. Also to make things pretty simpler you can make use of the readily available aws management console if you are only worry is to start, stop or terminate the instance. Also people have build some thing called Config management system like opscode chef which is built of ruby or you can use puppet built of puppet lab's custom DSL.
I am not sure if you really need a program to do that. The Amazon Management Console ( https://console.aws.amazon.com ) is pretty straight forward, simple to use, you can spin thousands of instances in a very short time. I created 20 instances in about 3 minutes and deleted(terminated) 9 during my first interaction with the technology. Would you provide a use case where this is necessary? Its like you want to create a missile to kill a chicken(rather than buy a knife)
HTH, Thanks,
Bles
I used to work on a project that deals a lot with EC2 and one of my responsibility was to manage instances remotly( deploy/start/stor/reboot). I used Java and the Amazon API to write a communication module for the application.
In addition I made a few general ant scripts to deal with code that has to be deploed into an instance. Kind a old fashion way, but works perfectly :)
I am looking to develop a java REST web service to work with my android app that I am also developing and I have been trying to look for the best option to host the service and everything I find seems to lead me in a different direction.
Can anyone give me advice on what the best way to host a java REST web service would be? I can do linux or windows and am relatively familiar with the lamp stack and IIS.
Thank you
I would suggest looking at the Google App Engine for hosting, and writing the service in Java. I just set up a few services that way for an app I'm working on and it was fast and easy, and currently it's free of charge for a very generous limited usage.
Exposing REST type access to resources persisted as JPA entities is very straightforward with Play! framework:
http://www.playframework.org
RESTful on Play! framework
Hosting: Heroku ( http://www.heroku.com ) supports Java as a language (as well as Ruby, Node.js, Clojure, Python, and Scala), and Play! as a framework, making it a good candidate in case you are going the Play! route;-) ... though obviously not the only use case.
Development life-cycle: This overview and this tutorial should give you a pretty good feel of the development life-cycle with git and Heroku+Play; if coming from "regular" Java tooling type of environments, you may find this approach refreshing.
IDE integration: Play! has plugins for NetBeans, IntelliJ IDEA and Eclipse ( http://www.playframework.org/documentation/1.2/ide )
So if you are familiar with the lamp stack why not using php for the REST service? Check out zend's REST implementation.
There are several excellent hosted services for error notification and processing in the Ruby world, such as hoptoad and exceptional.
I'd like to find a similar service for Java. I don't want to install a separate log monitoring system like Nagios because this is for a product that gets installed by customers and I need to keep things simple.
I know there's a log4j-to-hoptoad integration called frog4j, but it hasn't been revved for nearly a year. Are there any other alternatives? I'd prefer to find a hosted service that supports java directly, or a more actively maintained 3rd party tool.
PS - I'm on Grails if there's something Grails-specific.
Thanks!
I work on Bugsnag and we fully support Java and have an OSS provider for Java which is located on GitHub.
I am not sure if this is what you are looking for but it seems pretty decent.
You can use LogDigger Connector library to capture Java web application errors. Standard version is free and collects request-level data and logs. (With Pro version you can track user actions and have the recent usage history included with the error report.)
Notifications can be send via email, collected using RSS or you can implement your own mechanism.
There's a built-in web interface to review error reports so you don't need an external service.