Tuesday, December 30, 2014
Dish Network
During this time, I have only had two boxes. The first was before the major HD revolution. When I got a new 1080p TV, I wanted the box to match, this was 2008. Since then, I have seen over-the-air updates of the box software as new features roll out and I appreciated that. The days of static code in a set-top box are long, long gone and I'm thankful for that. However, the technology got old, the menu wasn't in HD and was slow to respond. Further, my former Dish Network box (VIP722) was above my PS3 and if you just happened to leave the PS3 on, it would overheat.
As far as HD, the quality was lower than I've seen on other systems including my new Uverse service. My wife's parents have the Hopper/Joey system and it appears that my set-top box issues may have been better with that setup, but I really didn't want to pay more for what appeared to be the same channels. The one thing I did like was that I had one box for two TVs. I don't like the rent-a-box model, although I do now pay $8 for an additional Uverse box, but I do recall that the Hopper/Joey was more expensive than Uverse.
The final straw was this years issues with network contracts. I abhorred the idea of losing CBS, even if for a minute. Dish, you should not have an issue with losing a channel that folks can get for free! I know other channels were lost for a bit and added back. I do appreciate Dish fighting for the best prices, but somethings I just can't get past.
When I disconnected, I already had the Uverse setup all in place, the representative on the phone did everything he could to keep me as a customer. He said that I qualified for a $45 a month bill discount for 10 months because I was a customer for so long. My first thought was that I had to call to get that discount. If I was such a valued customer, I think they should have reached out to me. Also, I suspect the discount had more to do with the fact that I was cancelling than my tenure as a customer. Of course, he was mostly nice until he realized that he couldn't do anything more for me. Then it was like 'bye' and I was like 'do I get money back?' Here's the kicker. He told me that when I returned the box through shipping, I would have to pay $17 for the shipping or get my own shipping. So let me get this straight, you just offered me $450 in discounts to stay a customer, but now that I'm leaving for sure, I have to pay you $17. Unreal and goodbye...
Comcast
This year, and mostly this year only, we had some service issues. On two occasions we had a complete outage. On the first one, we called and they wanted to send a technician out. The outage was technically a massive slowdown to no response. We were connected according to the modem, but pages weren't loading at all or the page loads were slow. Our neighborhood has a Facebook page and many other Comcast subscribers were reporting the same issue. Finally, Comcast picked up on the issue, either through all of the calls or through their own health checks, and fixed the issue.
When my contract ended this year, I called and negotiated a new rate. I believe I got the 'new customer rate' and somehow that meant that my phone number would get disconnected so that they could reconnect it. Further, in order to get the rate, I had to add a $2.50 or $3.50 a month protection plan. Overall, the new rate was cheaper by $30 than the expired contract rate so I okay'ed it.
I didn't have much trouble disconnecting. They didn't try to keep me as a customer too much. That's just fine with me. When I cancelled, I already had the Uverse equipment so I wasn't going to bend to their temptations.
AT&T Uverse and My Home Network
I'm pretty impressed with the Uverse experience. Internet is fast enough with 18 Mbps plan. I've seen maximums in the 25 Mbps range as well too. TV is clear and HD picture is better than Dish Network. I've heard that Dish has the worst HD quality of the major providers. In one month of usage, I haven't experienced any bad network connectivity with the TV signal. Overall, though I'm very happy over my Comcast/Dish Network configuration.
I did a diagram of the configuration using Gliffy.
The diagram shows that I have decent separation between the TV network boxes and the Data/Computer network. I doubt it really matters, but it seems logical to separate the two. The N600 is necessary because I have an external storage drive that the NVG589 does not support. Further, the GS108 switch and the N600 are on separate floors in the house. I tried to connect the N600 to the GS108 switch, but the computer was not getting any internet responses. I suspect that is because the TV was taking most of the traffic and somehow leaving the router out of the picture.
I've recently added another router to the picture to help with wireless range in the house. My second floor had an RJ-45 jack in the third bedroom that goes into the basement. I connected that to the N600 and then configured the N300 to use the same wireless details (on a different channel) as the N600. Voila! Instant range extension! I was looking at the 'wireless repeater' functionality, but since I had the RJ-45 jack this was a no-brainer to use.
Sunday, August 10, 2014
I've gone Android!
I had two iPhones. I didn't think that the iPhone 6 was going to offer anything revolutionary. I realized that from a hardware perspective I was going to get about the same phone. In general, the big ticket items in a phone have been figured out. After big ticket comes small features that you probably don't need anyway. Therefore, in my mind, the last major difference is software. I figured that iOS 8 would look much like 7 as the previous versions looked all similar.
The Galaxy S5 started looking really good to me. I really do think it was just a different interface than what I was used to. Further, I was all 'Google up' with my services. Between Gmail, Drive, Contacts, and Calendar, the switch was easy. I never stored a contact locally. I always used my Google calendar for events. I've even expanded to use Picasa more with my back catalog of iPhone pictures. I uploaded every single song I have to Google Play Music for free.
It was a good switch, but hey I still have my iPad!
Saturday, July 27, 2013
Using CXF Interceptors to measure WebService or REST Service time
Let's say I have this simple service:
@WebService
public interface Hello {
String sayHello();
String sayGoodbye();
}
I want to know how often and how long sayHello() is executed compared to sayGoodbye(). I could add:
@WebService
public interface Hello {
@Profiled(tag = "sayHello")
String sayHello();
@Profiled(tag = "sayGoodbye")
String sayGoodbye();
}
In this fashion, I would use Perf4Js @Profiled annotation and it would log messages telling me each time a sayHello() or sayGoodbye() method was called. However, that's not enough. I've just cut out the time of one of the most important parts of WebServices, XML processing.Enter the CXF Interceptor, assuming of course that I was using CXF, I can write a custom interceptor by extending AbstractPhaseInterceptor<Message>, a fairly generic extension that would apply to JAXWS and JAXRS services. The new in interceptor would start a new Perf4j StopWatch (log4j or slf4j implementation if you please) and the new out interceptor would stop the StopWatch which would force the log record. With the interceptor, I can also control the phase at which the interceptor is invoked.
Now my service would look like this:
@org.apache.cxf.interceptor.InInterceptors (interceptors = "net.halverson.interceptor.TimerInInterceptor" )
@org.apache.cxf.interceptor.OutInterceptors (interceptors = "net.halverson.interceptor.TimerOutInterceptor" )
@WebService
public interface Hello {
String sayHello();
String sayGoodbye();
}
But how do I know whether sayHello() or sayGoodbye() was called. I suspect I could access the Message object in the interceptor and find out, but maybe I want more control than that. That Message object is hanging around while my service is called and I can even place some of my own objects in it, however, my service implementation does not have access to the Message object and I doubt I would ever want it to.
How then can I update the StopWatch with a 'tag' or 'message' for Perf4j to log? A ThreadLocal will do. Remember how we started the StopWatch in the in interceptor and stopped it in the out interceptor, we can use a ThreadLocal to place the StopWatch into that thread variable state and access the object across the thread without having to pass the object along the method calls in the stack.
Something like this:
public class ServiceTimer {
private static final ThreadLocal<Slf4JStopWatch> stopWatch = new ThreadLocal<Slf4JStopWatch>() {
@Override
public Slf4JStopWatch initialValue() {
return new Slf4JStopWatch();
}
};
// execute in the in interceptor, ServiceTimer.getStopWatch().start();
// execute in the out interceptor, ServiceTimer.getStopWatch().stop();
public static SLF4JStopWatch getStopWatch() {
return stopWatch.get();
}
// for clean up in the out interceptor
public static void removeWatch() {
stopWatch.remove();
}
}
Then in the service implementation of Hello interface:
@Service
public class HelloImpl implements Hello {
public String sayHello() {
ServiceTimer.getStopWatch().setTag("sayHello");
return "Hello!";
}
public String sayGoodbye() {
ServiceTimer.getStopWatch().setTag("sayGoodbye").setMessage("blah!");
return "Goodbye!";
}
}
In the end you'll get a two log records like this after the service is executed:
2013-07-27 10:45:45,328 INFO (http-8181-1) (TimingLogger) start[1374939945321] time[7] tag[sayGoodbye] message[blah!]
2013-07-27 10:46:03,565 INFO (http-8181-1) (TimingLogger) start[1374939963562] time[2] tag[sayHello]
See full code example here:Github
Case # 123403984-1: JavaScript v. JSP
For JSP: I think the largest win here is when your page has a lot of manipulation to do and you want to run that on the server side instead of the client side. I'm sure your server cluster is more powerful and can deliver that page better than a client side rendering. The other argument I think is necessary here is hiding how the page was really built. When I write the JSP, it looks nothing like what is delivered to the consumer as all of the Java is replaced with HTML. I think that is a big positive for JSPs.
Against JSP: With JSPs, I've found that I've been a bit hard pressed to test my pages. To truly find out if my page is working, I have to start up my web app server and try to break it. When using MVC or just a servlet to deliver the page, I've found that I'm locking in the page to be delivered with the service that I just coded.
For JavaScript: In general, you can just do more with the manipulation of the page. This week, I've been able to prevent the default actions on buttons, make AJAX get and post calls, create new HTML and more. Further, with jQuery you can do a lot of JavaScript actions more simplistically. Since it's HTML and script code that is decoupled from the web app server, I can write the code in gedit/Notepad and test in the browser while my web app server is always up.
Against JavaScript: For me, the notation is a bit clunky to get started with. The use of functions compared to Java methods doesn't really match up where it's still called 'Java'. The other draw back is that you have to get used to how a browser processes a page to manipulate it. This is very different for a back-end developer.
Summation: JavaScript is another tool in my box now and I think I might have to use it more than I used JSPs. I do like how I can build those REST services and use them at will. I like how I can develop a new page to replace the old one without disturbing the existing one or writing a new service. Testing is a big win since I don't have to recycle the web app server when I make changes.
Friday, December 28, 2012
WD MyBook Essential in Linux
Procedure:
1) Open a terminal
2) sudo mkdir /media/directory-you-want-to-mount-to
3) sudo gedit /etc/fstab
4) When the gedit window opens, add the following:
//router-ip-address/USB_Storage/directory-you-want-to-mount-from /media/directory-you-want-to-mount-to cifs guest,_netdev 0 0
5) Save
6) sudo mount -a
7) If successful, you should see the drive mounted on you desktop. If not successful, I'm guessing that you'll get a message from 'mount' command. I'd recommend that 'mount -a' works before restarting, you might have issues with logging in if you don't.
Notes:
- I read that '_netdev' is used to wait until the network connection is available to finalize the command.
- If you need a secured login, see http://opensuse.swerdna.org/susesambacifs.html#permsec
- I've recently had to include 'sec=ntlm' before 'guest' above in order to make the connection. Without it, I was getting an input/output error.